<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let str="安小鸟";
        let a=str.padStart(5,"0");
        console.log(a);

        let b=str.padEnd(5,"0");
        console.log(b);

        //身份证号加密
        let id="17496299905046666";
        let eid=id.slice(-6);//字符串截取
        let code=eid.padStart(18,"*");
        console.log(code);
    </script>
</body>
</html>